package com.starleague.battletech.unit.mech;

import java.util.Map;

import com.starleague.battletech.game.AbstractBattletechGame;
import com.starleague.battletech.game.AbstractBattletechTeam;
import com.starleague.battletech.unit.AbstractBattletechUnit;
import com.starleague.battletech.unit.AbstractPilot;
import com.starleague.battletech.unit.AbstractWeight;
import com.starleague.battletech.unit.BattletechUnitMovementType;
import com.starleague.hexagonal.flat.FlatHexDirection;

public abstract class AbstractMech
        extends AbstractBattletechUnit
        implements IBipedMech, IQuadrupedMech, IMutableMech
{
    private FlatHexDirection facingDirection;
    private MechMovementMode movementMode;

    protected AbstractMech(AbstractBattletechGame game,
                           AbstractBattletechTeam team,
                           AbstractPilot pilot,
                           AbstractWeight weight,
                           BattletechUnitMovementType movementType)
    {
        super(game, team, pilot, weight, movementType);
    }

    protected AbstractMech()
    {
        //
    }

    //
    // Movement / Position
    //

    @Override
    public FlatHexDirection getFacingDirection()
    {
        return this.facingDirection;
    }

    @Override
    public void setFacingDirection(FlatHexDirection facingDirection)
    {
        this.facingDirection = facingDirection;
    }

    @Override
    public MechMovementMode getMovementMode()
    {
        return this.movementMode;
    }

    @Override
    public void setMovementMode(MechMovementMode movementMode)
    {
        this.movementMode = movementMode;
    }

    @Override
    public boolean hasMoved()
    {
        return (this.movementMode != null);
    }

    @Override
    public void clearMovement()
    {
        super.clearMovement();
        this.movementMode = null;
    }

    //
    // TODO: Hit Locations
    //

    @Override
    public IMechHitLocationHead getHead()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationCenterTorso getCenterTorso()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationSideTorso getLeftTorso()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationSideTorso getRightTorso()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationLeg getLeftLegBack()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationLeg getRightLegBack()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationLeg getLeftLegFront()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationLeg getRightLegFront()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationArm getLeftArm()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationArm getRightArm()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationLeg getLeftLeg()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechHitLocationLeg getRightLeg()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechCockpit getCockpit()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechLifeSupport getLifeSupport()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public IMechSensors getSensors()
    {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Map<String, Object> infoProperties()
    {
        Map<String, Object> infoPropertyMap = super.infoProperties();
        infoPropertyMap.put("facingDirection", this.facingDirection);
        infoPropertyMap.put("movementMode", this.movementMode);
        // infoPropertyMap.put("internalStructure", this.internalStructure);
        // infoPropertyMap.put("engine", this.engine);
        // infoPropertyMap.put("gyro", this.gyro);
        // infoPropertyMap.put("hitLocations", this.hitLocations);
        return infoPropertyMap;
    }
}
